/*
 * > /*
>  * INSANE - Interactive Structural Analysis Environment
>  *
>  * Copyright (C) 2003-2004
>  * Universidade Federal de Minas Gerais
>  * Escola de Engenharia
>  * Departamento de Engenharia de Estruturas
>  *
>  * Author's email :     insane@dees.ufmg.br
>  * Author's Website :   http://www.dees.ufmg.br/insane
>  *
>  * This program is free software; you can redistribute it and/or
>  * modify it under the terms of the GNU General Public License
>  * as published by the Free Software Foundation; either version 2
>  * of the License, or any later version.
>  *
>  * This program is distributed in the hope that it will be useful,
>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  * GNU General Public License for more details.
>  *
>  * You should have received a copy of the GNU General Public License
>  * along with this program; if not, write to the Free Software
>  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-
> 1307, USA.
 *
 */

package br.ufmg.dees.insane.parser;

import java.util.ArrayList;
import java.util.Observable;
import java.util.Observer;

import br.ufmg.dees.insane.model.geo.halfEdgeDataStructure.HalfEdgeModel;
import br.ufmg.dees.insane.model.postp.GeoPostpModel;
import br.ufmg.dees.insane.model.postp.StepPostp;

public class ParserHalfEdge extends Observable implements Observer{
	
	private ArrayList<HalfEdgeModel> halfEdgeList;
	private StepPostp stepPostp;
    
	public ParserHalfEdge(StepPostp stepPostp){
		halfEdgeList = new ArrayList<HalfEdgeModel>();
		this.stepPostp = stepPostp;
	}

	public synchronized ArrayList getHalfEdgeList(){
		GeoPostModelToHalfEdge parser = new GeoPostModelToHalfEdge();
		for(int i=0;i<this.stepPostp.getGeoPostpModelList().size();i++){
			if((GeoPostpModel)this.stepPostp.getGeoPostpModelList().get(i)!=null){
				parser  = new GeoPostModelToHalfEdge((GeoPostpModel)this.stepPostp.getGeoPostpModelList().get(i));
				this.halfEdgeList.add(parser.getHEModel());
			}
		}
		return this.halfEdgeList;
	}
	

	//observa o ParserPostpModel
	//observado pelas internalframes
	public void update(Observable arg0, Object arg1) {
		// TODO Auto-generated method stub
		
	}
	
	
	
}
